package com.flyco.modules.stm.service.impl;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.flyco.modules.stm.entity.StmReplenishmentItem;
import com.flyco.modules.stm.mapper.StmReplenishmentItemMapper;
import com.flyco.modules.stm.service.IStmReplenishmentItemService;
import com.flyco.modules.stm.vo.StmPrintVO;
import com.flyco.modules.stm.vo.StmReplenishmentItemPage;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * @Description: 门店要货明细
 * @Author: flyco
 * @Date:   2020-11-23
 * @Version: V1.0
 */
@DS("store")
@Service
public class StmReplenishmentItemServiceImpl extends ServiceImpl<StmReplenishmentItemMapper, StmReplenishmentItem> implements IStmReplenishmentItemService {
	
	@Autowired
	private StmReplenishmentItemMapper stmReplenishmentItemMapper;
	
	@Override
	public List<StmReplenishmentItem> selectByMainId(Long mainId) {
		return stmReplenishmentItemMapper.selectByMainId(mainId);
	}

	@Override
	public List<StmPrintVO> selectByIds(List<Long> ids, Date createTime) {
		return stmReplenishmentItemMapper.selectByIds(ids, createTime);
	}

	@Override
	public Page<StmReplenishmentItemPage> getReplenishmentItemPage(Page<StmReplenishmentItemPage> page, Wrapper<StmReplenishmentItem> wrapper) {
		return page.setRecords(stmReplenishmentItemMapper.getReplenishmentItemPage(page, wrapper));
	}
}
